﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using DataObjects;
using DataObjects.Enums;
using DataObjects.Behaviours;
using GameRules;

namespace Tester
{
    class Program
    {
        static void Main(string[] args)
        {
            GameFactory.InitialiseSystems();

            GameMap.Add(GameFactory.BuildGamePiece(BahaviourTypes.Aggresive, 1));
            GameMap.Add(GameFactory.BuildGamePiece(BahaviourTypes.Defensive, 1));
            GameMap.Add(GameFactory.BuildGamePiece(BahaviourTypes.Defensive, 2));
            GameMap.Add(GameFactory.BuildGamePiece(BahaviourTypes.Defensive, 2));
            GameMap.Add(GameFactory.BuildGamePiece(BahaviourTypes.Aggresive, 3));
            GameMap.Add(GameFactory.BuildGamePiece(BahaviourTypes.Aggresive, 3));

            int teams = GameMap.TeamsRemaining();
            while (GameMap.TeamsRemaining() > 1)
            {
                List<GameObject> activePieces = GameMap.GetPieces(true);

                foreach (GameObject obj in activePieces)
                    obj.Behaviour.PreTurnProcessing();
                foreach (GameObject obj in activePieces)
                    obj.Behaviour.ProcessTurn();
                foreach (GameObject obj in activePieces)
                    obj.Behaviour.PostTurnProcessing();
            }
        }
    }
}
